-
Notifications
You must be signed in to change notification settings - Fork 854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP: mark a breakpoint as broken when an error is received when breakpoint_set is executed to set a breakpoint #6876
PHP: mark a breakpoint as broken when an error is received when breakpoint_set is executed to set a breakpoint #6876
Conversation
It seems that there is an exception in your video. That is not related to this PR, right? |
Updated the description. I hope it will be clearer now. |
Yes, that's right. |
php/php.dbgp/src/org/netbeans/modules/php/dbgp/breakpoints/BreakpointModel.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big code change, looks good to me. Thanks!
I see. Thanks for your explanation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks!
…point_set is executed to set a breakpoint
e569ca5
to
1cda8a7
Compare
Thank you, guys! Merging. |
xdebug of different versions behaves differently when setting duplicate breakpoints.
xdebug version 2.5.5 allows you to set a duplicate breakpoint.
xdebug version 3.1.6 and higher does not allow setting a duplicate breakpoint by method.
Since version 3.2.0 it also does not allow setting a duplicate breakpoint by line.
If an attempt is made to set a duplicate breakpoint, xdebug returns an error:
This PR implements this error handling and marks the breakpoint as broken.
Tested on versions of xdebug:
2.5.5
,3.1.6
,3.2.1
,3.3.0
.Example for a line breakpoint:
Put two breakpoints on the line
echo 'Hello';
with different conditions (the order in which the breakpoints are set is important!):$s == 4
$s == 12
When debugging on xdebug version
2.5.5
or3.1.6
, it will stop at the point with the condition$s == 12
.Everything is fine with this.
When debugging on version
3.2.0
, stopping at a point with the condition$s == 12
will not be executed, because thexdebug will not set the breakpoint. But the breakpoint is shown as normal, which is misleading.
Behavior before PR:
simplescreenrecorder-2023-12-24_00.46.34.mp4
Behavior after PR:
simplescreenrecorder-2023-12-24_00.44.03.mp4